﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace App.Validate
{
    public class AndCompositeValidatorAttribute : CompositeValidatorAttribute
    {
        public AndCompositeValidatorAttribute(string messageTemplate, string validatorElements)
            : base(messageTemplate, validatorElements)
         {}

        public override CompositeValidator CreateCompositeValidator(IEnumerable<Validator> validator)
        {
            Guard.ArgumentNotNull(validator, "validator");
            return new AndCompositeValidator(this.MessageTemplate, validator);
        }
    }
}
